// FeedImage.cs
// Facebook/Framework/Service
// Copyright (c) 2007, Nikhil Kothari. All Rights Reserved.
//

using System;
using System.Diagnostics;

namespace Facebook.Service {

    /// <summary>
    /// Represents an image and its associated link within a user feed story.
    /// </summary>
    public sealed class FeedImage {

        private string _imageUrl;
        private string _imageLinkUrl;

        /// <summary>
        /// Initializes an instance of a feed image with its URL and link target.
        /// </summary>
        /// <param name="imageUrl">The URL of the picture or a Facebook picture ID.</param>
        /// <param name="imageLinkUrl">The URL representing the target of the image.</param>
        public FeedImage(string imageUrl, string imageLinkUrl) {
            if (String.IsNullOrEmpty(imageUrl)) {
                throw new ArgumentNullException("imageUrl");
            }
            if (String.IsNullOrEmpty(imageLinkUrl)) {
                throw new ArgumentNullException("imageLinkUrl");
            }

            _imageUrl = imageUrl;
            _imageLinkUrl = imageLinkUrl;
        }

        /// <summary>
        /// The URL representing the target of the image.
        /// </summary>
        public string ImageLinkUrl {
            get {
                return _imageLinkUrl;
            }
        }

        /// <summary>
        /// The URL of the picture or a Facebook picture ID.
        /// </summary>
        public string ImageUrl {
            get {
                return _imageUrl;
            }
        }
    }
}
